Online documentation - Websydian v6.5 |
Severity | Low |
---|---|
Product | Websydian TransacXML |
Websydian version | 5.5, 5.5 SP1 |
Resolved in | v6.0 |
Plex version | 5.0 and later |
Platform | Windows and Java |
Category | TransacXML - Webservices |
Problem | When you insert a complex element as the child of parent
element it will normally just be placed as the last child of the
parent.
In some situations it is necessary to place the complex elements between or before the simple elements which are also children of the parent element.
You can control the position of the complex element by inserting a ComplexElement field as described here: The problem is that when you use the InsertRow function to insert the complex element, it is still placed as the last child - no matter where you have placed the ComplexElement field. |
Answer | The InsertRow function scoped by the XMLElement entity lacks a check of whether the parent element has an ENT Has FLD triple where the target is a ComplexElement field with the same name as the complex element being inserted. |
Workaround | We have made a workaround:
A local model showing the modifications necessary is found here. The following steps are necessary: 1) Create an entity FixXmlElement is a XMLElement
2) Create two fields: WSYFileName FLD is a FLD WSYDOM/FileName WSYComplexFound FLD is a FLD FIELDS/YesNo
3) For the InsertRow function scoped by the FixXmlElement entity create the following triples:
InsertRow FNC local FLD WSYXML/EntityName ...for Local InsertRow FNC local FLD WSYFileName ...for Local InsertRow FNC local FLD WSYComplexFound ...for Local
4) Open the action diagram for the InsertRow function - and enter all the local modifications from the FixElement.InsertRow function from the example model. Copy the contents in the following order: a) Copy the subroutine "Complex element insert before" b) Copy the subroutine "Check For Complex Element in Parent" c) copy the contents of the edit point "After loop in data variable" (in the subroutine "Execute"
5) Let the complex element, which is to be placed before or between the simple elements, inherit from FixXmlElement
6) Regenerate and build the InsertRow function for the complex element inheriting from FixXmlElement |